<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="css/swiper.css">
    <style>
        .swiper-slide {
            width: 500px;
            height: 300px;
            background: red;
            text-align: center;
            line-height: 300px;
        }
        
        .swiper-slide:nth-child(1) {
            background: yellow;
        }
        
        .swiper-slide:nth-child(2) {
            background: blue;
        }
        
        .swiper-slide:nth-child(3) {
            background: green;
        }
    </style>
</head>

<body>
    <div class="swiper-container">
        <div class="swiper-wrapper">
            <div class="swiper-slide">slider1</div>
            <div class="swiper-slide">slider2</div>
            <div class="swiper-slide">slider3</div>
        </div>
    </div>

    <script src="js/swiper.js"></script>
    <script>
        var mySwiper = new Swiper('.swiper-container', {
            autoplay: true, //可选选项，自动滑动
            waitForTransition: false,

        })
    </script>
</body>

</html>